<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

use app\models\Carousel;

/* @var $this yii\web\View */
/* @var $model app\models\Carousel */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="carousel-form">

    <!--
    <//?php $form = ActiveForm::begin(); ?>
    -->

    <?php $form = ActiveForm::begin([
        'enableClientValidation' => true,
        'options' => ['enctype' => 'multipart/form-data', 'class' => 'model-form']
    ]); ?>
    

    <?= $form->field($model, 'file')->fileInput()->hint('图片建议尺寸：1070像素 * 360像素')  ?>

    <!--
    <//?= $form->field($model, 'image')->textInput(['maxlength' => true]) ?>
    -->

    <?= $form->field($model, 'link')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'text')->textarea(['rows' => 6]) ?>

    <!--
    <//?= $form->field($model, 'order_num')->textInput() ?>
    -->

    <?= $form->field($model, 'status')->dropDownList(Carousel::getStatusOption()) ?>
    
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '新增' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
